{% comment %}
Assumes the following are defined:
 - package
 - instance
 - distro
 - show_repo
{% endcomment %}

<div class="well well-sm">
  {% if false %}
    <table class="table">
      <tr>
        <td width="100px" class="text-center">
          <img style="width: 30px" src="{{ '/assets/repo.png' | prepend: site.baseurl }}">
        </td>
        <td>
          <h5>
            <a href="{{site.baseurl}}/r/{{ package.repo.name }}/{{ package.repo.id }}">{{ package.repo.name }}</a>
            <small>repository</small>
          </h5>
        </td>
      </tr>
    </table>
  {% endif %}
  <table class="table">
    <tr>
      <td width="100px" class="text-center">
        <img style="width: 80px" src="{{ '/assets/package.png' | prepend: site.baseurl }}">
      </td>
      <td>
        <h3 style="margin-top: 5px">
          <a style="text-decoration:none" href="{{site.baseurl}}/p/{{package.name}}">{{package.name}}</a> <small>package from <a style="text-decoration:none" href="{{site.baseurl}}/r/{{ package.repo.name }}/{{ package.repo.id }}">{{ package.repo.name }}</a> repo</small>
        </h3>
          {% for peer in package.snapshot.packages %}
            {% assign labeled_package = peer[1] %}
            {% if peer[0] != package.name %}
              <a class="label label-primary pkg-label" href="{{site.baseurl}}/p/{{peer[0]}}/{{package.repo.id}}">{% include peer_label.html %}</a>
            {% else %}
              <span class="label label-default pkg-label">{% include peer_label.html %}</span>
            {% endif %}
          {% endfor %}
      </td>
    </tr>
  </table>
  <div class="top-buffer distro distro-{{distro}}">
    {% include instance_switch.html %}
  </div>
</div>
